﻿@{
    ViewBag.Title = "UploadFile";
    Layout = "~/Views/Share/_Layout.cshtml";
}

@section css
{
    <link href="~/Content/uploadify/uploadify.css" rel="stylesheet" />
}
@section scripts
{
    <script src="~/Content/uploadify/swfobject.js"></script>
    <script src="~/Content/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
    <script>
        $(function () {
            init();
        });

        function init(){

            $("#uploadify").uploadify({
                'uploader': '/Content/uploadify/uploadify.swf',
                'script': '/UI/AAA?fun=upload_',
                'cancelImg': '/Content/uploadify/cancel.png',
                'folder': 'AdvertiseSoltPreviewTemp',
                'queueID': 'fileQueue',
                'fileDataName': 'Filedata',
                'auto': false,
                'multi': false,
                'buttonText': 'Browser',
                'fileExt': '*.png;*.jpg;*.bmp;*.jpeg;',
                'fileDesc': '图片文件(*.png;*.jpg;*.bmp;*.jpeg;)',
                'onComplete': function (e, queueId, fileObj, response, data) {
                },
                'onSelect': function (e, queueId, fileObj) {

                }
            });
        }
    </script>
}

@section head{

        <div class="col-sm-4">
            <ol class="breadcrumb">
                <li>
                    <a href="/">Home</a>
                </li>
                <li>
                    <a href="/">UI&控件</a>
                </li>
                <li class="active">
                    <strong>Upload File</strong>
                </li>
            </ol>
        </div>

}

<div class="rows">

    <div class="col-lg-5">
        <form class="form-horizontal">
            <p>Sign in today for more expirience.</p>
            <div class="form-group"><label class="col-lg-2 control-label">图片上传</label>
                <div class="col-lg-10">
                    <div id="fileQueue" style="width:380px; height:80px;" >&nbsp; &nbsp; 上传图片前</div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-lg-offset-2 col-lg-10">
                    <input type="file" name="uploadify" id="uploadify" />
                    <button class="btn btn-sm btn-white" type="button" onclick="uploadimg.Upload();return false;">开始上传</button>
                </div>
            </div>
            <object type="application/x-shockwave-flash" data="/Content/uploadify/uploadify.swf" width="80" height="20" id="uploadifyUploader" style="visibility: visible;">

<param name="quality" value="high"><param name="wmode" value="opaque"><param name="allowScriptAccess" value="sameDomain">

<param name="flashvars" value="uploadifyID=uploadify&amp;pagepath=/UI/UploadFile/&amp;buttonText=Browser&amp;script=/UI/AAA?fun=upload_&amp;folder=AdvertiseSoltPreviewTemp&amp;width=80&amp;height=20&amp;wmode=opaque&amp;method=POST&amp;queueSizeLimit=999&amp;simUploadLimit=1&amp;

fileDesc=图片文件(*.png;*.jpg;*.bmp;*.jpeg;)&amp;fileExt=*.png;*.jpg;*.bmp;*.jpeg;&amp;fileDataName=Filedata&amp;queueID=fileQueue"></object>
        </form>    </div>
</div>


